load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "corpus",
    srcs = ["corpus.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/schemachanger/corpus",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/sql/schemachanger/scop",
        "//pkg/sql/schemachanger/scpb",
        "//pkg/sql/schemachanger/scplan",
        "//pkg/util/protoutil",
        "//pkg/util/retry",
        "//pkg/util/syncutil",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_errors//oserror",
    ],
)

go_test(
    name = "corpus_test",
    srcs = ["corpus_test.go"],
    deps = [
        ":corpus",
        "//pkg/clusterversion",
        "//pkg/jobs/jobspb",
        "//pkg/sql/schemachanger/scop",
        "//pkg/sql/schemachanger/scpb",
        "//pkg/sql/schemachanger/scplan",
        "//pkg/testutils/skip",
        "//pkg/util/mon",
        "@com_github_stretchr_testify//require",
    ],
)
